import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '@/styles/base.css'
import moment from 'moment' // 导入moment 时间处理插件
import '@/permission'

Vue.use(ElementUI)
Vue.prototype.$moment = moment // 将moment 挂在到vue 的原型对象上
Vue.config.productionTip = false
// 自动以图片加载错误指令
Vue.directive('imgerror', {
  inserted(el, binding) {
    el.onerror = function () {
      this.src = binding.value
    }
  }
})
new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
